package com.pur.zsms.foodmanage.food.dao;

import java.util.List;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.foodmanage.food.po.FoodMaterPo;
import com.pur.zsms.foodmanage.food.po.FoodPo;
import com.pur.zsms.foodmanage.food.po.FoodTypePo;
import com.pur.zsms.foodmanage.food.vo.FoodMaterVo;
import com.pur.zsms.foodmanage.food.vo.FoodTypeVo;
import com.pur.zsms.foodmanage.food.vo.FoodVo;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.po.UserRolePo;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.po.CashierOrderDetailPo;
import com.pur.zsms.po.CashierOrderPo;
import com.pur.zsms.po.ShoppingCartCashierPo;
import com.pur.zsms.vo.ShoppingCartCashierVo;

public interface IFoodDao {

	/**
	 * 查询出所有用户信息
	 * 
	 * @param 查询条件封装在UserVo中
	 * @return
	 */
	public PaginationSupport listFood(PageController pageController, FoodVo foodVo) throws GenericException;

	public PaginationSupport listFoodForCashier(PageController pageController, FoodVo foodVo) throws GenericException;

	public List<Object[]> listFoodForCashier(FoodVo foodVo) throws GenericException;

	public PaginationSupport listFoodIndex(PageController pageController, FoodVo foodVo) throws GenericException;

	public PaginationSupport listFoodMaterDetailed(PageController pageController, FoodMaterVo foodMaterVo) throws GenericException;

	public PaginationSupport findShoppingCartCashier(PageController pageController, ShoppingCartCashierVo c) throws GenericException;

	public PaginationSupport getShoppingCartOrderTable(PageController pageController, ShoppingCartCashierVo c) throws GenericException;

	/**
	 * 根据用户ID查询出所有用户信息
	 * 
	 * @return
	 */
	public UserPo listUserByUserId(String userId) throws GenericException;

	/**
	 * 根据foodName查寻菜单信息
	 * 
	 * @param foodName
	 * @return
	 */
	public FoodPo listFoodByFoodName(String foodName) throws GenericException;

	public List<FoodPo> getFoodPo(FoodVo vo) throws GenericException;

	public List<Object[]> getFoodMaterId(String foodName) throws GenericException;

	public List<FoodPo> findFoodPo(FoodVo foodVo) throws GenericException;

	/**
	 * 新增用户信息
	 */
	public int addFood(FoodPo c) throws GenericException;

	public void addCashierOrderPo(CashierOrderPo c) throws GenericException;

	public void addCashierOrderDetailPo(CashierOrderDetailPo c) throws GenericException;

	public void addFoodType(FoodTypePo c) throws GenericException;

	public void updateFood(FoodPo c) throws GenericException;

	public void updateShoppingCartCashierPo(ShoppingCartCashierPo c) throws GenericException;

	/**
	 * 新增材料信息
	 */
	public void addFoodMater(FoodMaterPo c) throws GenericException;

	public void addShoppingCartCashierPo(ShoppingCartCashierPo c) throws GenericException;

	/**
	 * 修改用户信息
	 */
	public void updateUser(UserPo c) throws GenericException;

	/**
	 * 删除用户信息
	 */
	public void deleteFood(int foodId) throws GenericException;

	public void deleteShoppingCartCashierPo(ShoppingCartCashierVo c) throws GenericException;

	public void deleteFoodMaterPo(int foodId) throws GenericException;

	/**
	 * 根据用户ID查询出该用户所有角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return 用户角色信息
	 */
	public List<UserRolePo> listUserRoleByUserId(String userId) throws GenericException;

	/**
	 * 更新用户角色信息
	 * 
	 * @param UserRolePo
	 *            用户角色信息
	 * @return
	 */
	public void updateUserRole(UserRolePo userRolePo) throws GenericException;

	/**
	 * 根据用户角色ID删除用户角色信息，因为使用主键删除，所有只删除一条记录
	 * 
	 * @param UserRoleId
	 *            用户ID
	 * @return 用户角色信息
	 */
	public void deleteUserRole(String userRoleId) throws GenericException;

	/**
	 * 根据用户ID删除该用户所有角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return 用户角色信息
	 */
	public void deleteUserRoleByUserId(String userId) throws GenericException;

	/**
	 * 根据用户名查找用户
	 */
	public UserPo findUserLogon(String userName, String password) throws GenericException;

	/**
	 * 查询用户所对应菜单
	 * 
	 * @param userId
	 * @return
	 */
	public List<MenuPo> getUserMenuList(String userId) throws GenericException;

	public List<FoodTypePo> getFoodType(FoodTypeVo c) throws GenericException;

	public List<ShoppingCartCashierPo> getShoppingCartCashierPo(ShoppingCartCashierVo c) throws GenericException;

	public List<Object[]> getShoppingCartCasherTotalValue(ShoppingCartCashierVo c) throws GenericException;

	public List<Object[]> getCartOrderNumber(long shopId) throws GenericException;

}
